import request from '@/utils/request'

/*获取vender列表*/ 
export function vendorlist(query) {
  // /plm/vendor/listVendorAllProperty
    return request({
      url: '/plm/vendor/listVendorAllProperty',
      method: 'get',
      params: query
    })
  }
//查询vendor列表详情
export function vendordetail(id) {
    return request({
      url: '/plm/vendor/' + id,
      method: 'get',
    })
  }
// 新增vendor
export function addvendor(data) {
    return request({
      url: '/plm/vendor',
      method: 'post',
      data: data
    })
  }

// 修改vendor
export function updatevendor(data) {
    return request({
      url: '/plm/vendor',
      method: 'put',
      data: data
    })
  }

// 删除vendor
export function delvendor(id) {
    return request({
      url: '/plm/vendor/' + id,
      method: 'delete'
    })
  }

/*获取vendor动态属性列表*/ 
export function vendorpropertylist(query) {
    return request({
      url: '/vendor/property/list',
      method: 'get',
      params: query
    })
  }
//新增时获取动态属性
export function listByType(query) {
  return request({
    url: '/vendor/property/listByType',
    method: 'get',
    params: query
  })
}
//获取动态属性类型
export function vendorpropertytypelist(query) {
  return request({
    url: '/vendor/property/typeList',
    method: 'get',
    params: query
  })
}

// 新增vendor动态属性
export function addtvendorproperty(data) {
    return request({
      url: '/vendor/property',
      method: 'post',
      data: data
    })
  }

// 修改vendor动态属性
export function updatetvendorproperty(data) {
    return request({
      url: '/vendor/property',
      method: 'put',
      data: data
    })
  }

//查询单条动态属性
export function vendorpropertydetail(id) {
    return request({
      url: '/vendor/property/' + id,
      method: 'get',
    })
  }
// 删除vendorproperty
export function delvendorproperty(id) {
    return request({
      url: '/vendor/property/' + id,
      method: 'delete'
    })
  }

/*获取vender类型列表*/ 
export function vendortypelist(query) {
    return request({
      url: '/vendor/type/list',
      method: 'get',
      params: query
    })
  }
//查询vendortype列表详情
export function vendortypedetail(id) {
    return request({
      url: '/vendor/type/' + id,
      method: 'get',
    })
  }
// 新增vendortype
export function addtvendortype(data) {
    return request({
      url: '/vendor/type',
      method: 'post',
      data: data
    })
  }

// 修改vendortype
export function updatetvendortype(data) {
    return request({
      url: '/vendor/type',
      method: 'put',
      data: data
    })
  }

// 删除vendor
export function delvendortype(id) {
    return request({
      url: '/vendor/type/' + id,
      method: 'delete'
    })
  }